var url= 'http://localhost:7000/top/playlist';
/* function http(url){
    return new Promise((resolve,reject)=>{
        wx.request({
            url: baseUrl+url,
            data: {},
            method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
            header: {'content-type':'application/json'}, // 设置请求的 header
            responseType:'text',
            dataType:'json',
            success: function(res){
                resolve(res)
            },
            fail: function() {
               reject(res)
            }
        })
    })
}
function getTop250Http(){
    return http(':7000/top/playlist')
}
module.exports ={
    getTop250Http
} */

function http({
    offset,
    limit,
    success
}) {
    wx.request({
        url,
        data: {
            offset,
            limit
        },
        method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
        header: {
            'content-type': 'application/json'
        }, // 设置请求的 header
        responseType: 'text',
        dataType: 'json',
        success: function (res) {
            success(res)
        }
    })
}
module.exports=http;